#include"calclient.hpp"
#include<memory>
using namespace std;


static void Usage(string porc)
{
    std::cout << "\nUsage:\n\t" << porc << "serverip serverport\n\n";
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1); 
    }
    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);

    unique_ptr<calclient> tcli(new calclient(serverip, serverport));
    tcli->initclient();
    tcli->start();
    
    return 0;
}